package abaco.symbol;

import java.util.HashMap;

import abaco.Symbol;
import abaco.gui.Panel;
import abaco.gui.textfield.TextField;

public class Text extends TextField implements Symbol {
	protected Symbol parent = null;

	@Override
	public Symbol getSymbolParent() {
		return parent;
	}

	@Override
	public Text setSymbolParent(Symbol parent) {
		this.parent = parent;
		return this;
	}

	@Override
	public Text removeSymbolParent() {
		parent = null;
		return this;
	}

	@Override
	public Symbol buildPanel(Panel panel) {
		panel.add(this);
		return this;
	}

	@Override
	public Symbol getSymbolChild(String name) {return null;}
	@Override
	public HashMap<String, Symbol> getSymbolChildren() {return null;}
	@Override
	public Text setSymbolChild(Symbol child, String name) {return this;}
	@Override
	public String getSymbolChildName(Symbol child) {return null;}
	@Override
	public Text removeSymbolChild(String name) {return this;}

	@Override
	public String toLatex() {
		return "{" + getText() + "}";
	}
}
